package com.summer.util;

import java.util.HashMap;
import java.util.Map;

/**
 * Desc:
 * Created by tl on 2018/9/21
 */
public class Constant {
    //用户token的redis前缀
    public static final String TOKEN = "USER_";
    //验证码签名
    public static final String CONTENT_TITLE = "元素钱包";
    //默认密码
    public static final String DEFAULT_PASSWORD= "qwer1234";
    public static final byte BORROW_STATUS_REVIEW_PERSON = 3;
    public static final byte BORROW_STATUS_REVIEW_REJECT = 4;
    public static final byte BORROW_STATUS_REVIEW_PASS = 5;
    public static final byte REPAYMENT_STATUS_PAID = 2;
    public static final byte REPAYMENT_STATUS_PART_PAID = 1;
    public static final byte REPAYMENTDETAIL_STATUS_PAID = 2;
    public static final byte REPAYMENTDETAIL_TYPE_NORMAL = 0;
    public static final byte PAY_TYPE_UNKNOWN = 0;
    public static final byte PAY_TYPE_AUTO = 1;
    public static final byte PAY_TYPE_ONLINE_WX = 2;
    public static final byte PAY_TYPE_ONLINE_BANK = 3;
    public static final byte PAY_TYPE_ONLINE_ZFB = 4;
    public static final byte PAY_TYPE_OFFLINE_WX = 5;
    public static final byte PAY_TYPE_OFFLINE_BANK = 6;
    public static final byte PAY_TYPE_OFFLINE_ZFB = 7;
    public static final byte REPAYMENTDETAIL_TYPE_OVERDUE = 1;
    public static final byte REPAYMENTDETAIL_TYPE_FORWARD = 2;
    public static final byte USER_AUTHENTIC = 1;
    public static final byte USER_UNAUTHENTIC = 0;
    public static Map<Byte, String> BORROW_STATUS_MAP = new HashMap<>();
    public static Map<Byte, String> PAY_TYPE_MAP = new HashMap<>();
    public static final String RELATIVIZE_TYPE_GXBTB = "GXBTB";
    public static final String RELATIVIZE_TYPE_GXBTBRPT = "GXBTBRPT";
    public static final String RELATIVIZE_TYPE_GXBZM = "GXBZM";
    public static final String RELATIVIZE_TYPE_GXBDEBIT = "GXBDEBIT";
    public static final String REPAYMENT_TYPE_OVERDUE = "逾期待还";
    public static final String REPAYMENT_TYPE_NORMAL = "正常待还";
    public static final String REPAYMENT_TYPE_RENEWAL = "展期待还";
    public static final byte REPAYMENT_TYPE_OFFLINE = 1;
    public static final byte REPAYMENT_TYPE_FORWARD = 1;
    public static final byte COLLECTION_AUDIT_PASS = 2;
    public static final byte COLLECTION_AUDIT_REJECT = 1;
    public static final byte COLLECTION_AUDIT_TODO = 0;
    public static final byte COLLECTION_TYPE_PHONE = 1;
    public static final byte COLLECTION_TYPE_MSG = 2;

    static {
        BORROW_STATUS_MAP.put(BORROW_STATUS_REVIEW_PERSON, "待人工复审");
        BORROW_STATUS_MAP.put(BORROW_STATUS_REVIEW_REJECT, "复审驳回");
        BORROW_STATUS_MAP.put(BORROW_STATUS_REVIEW_PASS, "复审通过");
        PAY_TYPE_MAP.put(PAY_TYPE_UNKNOWN, "未知");
        PAY_TYPE_MAP.put(PAY_TYPE_AUTO, "代扣");
        PAY_TYPE_MAP.put(PAY_TYPE_ONLINE_WX, "微信线上");

        PAY_TYPE_MAP.put(PAY_TYPE_ONLINE_BANK, "银行卡线上");
        PAY_TYPE_MAP.put(PAY_TYPE_ONLINE_ZFB, "支付宝线上");
        PAY_TYPE_MAP.put(PAY_TYPE_OFFLINE_WX, "微信线下");
        PAY_TYPE_MAP.put(PAY_TYPE_OFFLINE_BANK, "银行卡线下");
        PAY_TYPE_MAP.put(PAY_TYPE_OFFLINE_ZFB, "支付宝线下");
    }
    /** 系统参数中返回list时使用的key的后缀 */
    public static final String SYS_CONFIG_LIST = "_LIST";
    /** 基础规则对应的集合 */
    public static String BASE_RULE = "BASE_RULE";
    /**提交服务密码标识 */
    public static final String SUB_PASSWORD = "SUB_PASSWORD";
    /**(提交查询密码)北京移动提交查询密码标识*/
    public static final String SUB_QUERY_PASSWORD="SUB_QUERY_PASSWORD";
    /**提交登录(或查询详单)短信验证码接口*/
    public static final String SUB_CAPTCHA="CAPTCHA";
    /*** UTF-8编码 */
    public static final String UTF8 = "UTF-8";
    public static final String TYPE_CLIENT_IOS = "ios";
    public static final String TYPE_CLIENT_ANDROID = "andriod";
    public static final long TOKEN_EXPIRATION_TIME = 7*24*60*60; //token过期时间（单位：秒）
    public static final long PHONE_CAPTCHA_EXPIRATION_TIME = 1800;//手机验证码过期时间
    public static final Integer RESULT_BAD_STATUS = -1; //返回失败的code状态
    public static final byte PHONE_CAPTCHA = 4; //手机验证码4位

    public static final byte PASSWORD_LOWEST = 6; //登录密码最低
    public static final byte PARSSWORD_HIGHEST = 20; //最高20位
    public static final byte USER_STATUS = 0; //用户状态为0时 才可用

    public static final String USER_FORBIDDEN= "用户被禁用";
    public static final String PHONE_IS_ILLEGAL= "手机号不合法";
    public static final String PARAM_IS_NOT_BALANK= "参数不能为空";
    public static final String PASSWORD_AUTHORITY = "请输入6-20位登录密码";
    public static final String CAPTCHA_AUTHORITY = "请输入4位手机验证码";
    public static final String CAPTCHA_IS_NOT_EXIST = "验证码失效";
    public static final String PHONE_CAPTCHA_SUFFIX = "phoneCaptchaKeySuffix";//Redis获取验证码的key的后缀
    public static final String APP_TOKEN_PREFIX = "App_User";
    public static final String SMS_TIRLE = "元素钱包";//短信发送的标题
    public static final String PHONE_REGULAR = "^((\\+?86)|(\\(\\+86\\)))?(13[0-9][0-9]{8}|14[0-9]{9}|15[0-9][0-9]{8}|17[0-9][0-9]{8}|18[0-9][0-9]{8})$";
    public static final String USER_MSG_NOT_EXIST = "用户信息为空";
    public static final String PARAM_ERROR = "参数有误";

    public  static final Byte AUTHENTIC_UNCOMPLETED_STATUS=0;//未认证状态
    public  static final Byte AUTHENTIC_PARTCOMPLETE_STATUS=1;//部分完成状态
    public  static final Byte AUTHENTIC_COMPLETED_STATUS=2;//已完成状态
    public  static final Byte BORROW_ORDER_REPAYMENT_STATUS = 10; //借款订单已还款的状态
    public  static final Byte BORROW_ORDER_OVERDUE_REPAYMENT_STATUS = 13;//逾期还款的状态
    public  static final Integer PARAM_IS_ZERO = 0; //参数为0

    public static final Integer BORROW_LOWEST_MONEY = 1000;//最低借款金额
    public static final Integer BORROW_LOWEST_PERIOD = 7; //最低借款期限
    public static final Integer LIST_SIZE_LENTH_ZORE = 0;//集合的长度为0
    public static final Integer BANK_VALID_STATUS = 1;//银行卡生效状态

    public static final Double APR_FEE = 0.3; //服务费率（如果UserMoneyRate表里没有该用户的信息）默认按这个平台配置传进来的可借额度的0.3计算服务费
    public static final Integer DOLLAR_CHANGE_PENNY = 100;//元到分的转换
    public static final String  REDIS_LOAN_DATA_PREFIX = "USER_LOAN_DATA_"; //允许借款后的借款数据，临时存入Redis的key前缀
    public static final long  LOAN_DATA_EXPIRATION_TIME = 30*60;//允许借款后的借款数据，临时存入Redis的过期时间

    public static final Integer LOAN_APR_FEE =1000; //借款服务费率转换元
    public static final Integer ARP_FEE = 10000; //费率万分之一
    public static final String PHONE_CAPTCHA_REGISTER_TYPE ="1"; //注册时发送的验证码类型
    public static final String PHONE_CAPTCHA_UPDATE_PASSWORD_TYPE ="2";//修改密码时，发送的验证码类型
    public static final String PHONE_CAPTCHA_UPDATE_PAY_PASSWORD_TYPE ="3";//忘记交易密码时的

    public static final String PHONE_CAPTCHA_UPDATE_PASSWORD_SUFFIX = "phoneUpdatePasswordCaptchaKeySuffix";//Redis获取验证码的key的后缀（修改密码时）
    public static final String PHONE_CAPTCHA_UPDATE_PAY_PASSWORD_SUFFIX = "phoneRegisterCaptchaKeySuffix";//Redis获取验证码的key的后缀（忘记交易密码修改交易密码时）
    public static final Byte ZM_INDUSTY_BLACK_STATUS = 0;//芝麻关注度黑名单1.是；0否'

    public static final Byte HULU_AUTH_STATUS = 0;//葫芦认证状态
}
